// 导航
var dropdown = document.querySelector('.dropdown');
var yin = document.querySelector('.yin');
var cang = document.querySelector('.cang');
dropdown.onmouseover = function() {
	cang.style.display = 'block';
	yin.style.display = 'none';
}
dropdown.onmouseout = function() {
	cang.style.display = 'none';
	yin.style.display = 'block';
}
// 二
var one = document.querySelector('.one');
var yino = document.querySelector('.yino');
var cango = document.querySelector('.cango');
one.onmouseover = function() {
	cango.style.display = 'block';
	yino.style.display = 'none';
}
one.onmouseout = function() {
	cango.style.display = 'none';
	yino.style.display = 'block';
}
// 三
var two = document.querySelector('.two');
var yint = document.querySelector('.yint');
var cangt = document.querySelector('.cangt');
two.onmouseover = function() {
	cangt.style.display = 'block';
	yint.style.display = 'none';
}
two.onmouseout = function() {
	cangt.style.display = 'none';
	yint.style.display = 'block';
}
// 四
var zhong = document.querySelector('.zhong');
var zho = document.querySelector('.zho');
var ng = document.querySelector('.ng');
zhong.onmouseover = function() {
	zho.style.display = 'none';
	ng.style.display = 'block';
}
zhong.onmouseout = function() {
	zho.style.display = 'block';
	ng.style.display = 'none';
}




// 点击显示

var a = document.querySelector("#nine");
var b = document.querySelector("#nine1");
var c = document.querySelector("#nine2");
var d = document.querySelector("#nine3");
var e = document.querySelector("#nine4");
var f = 1;
a.onclick = function() {
	if (f == 1) {
		
		d.style.background = "#F5F5F5";
		b.style.display = "none";
		c.style.display = "block";
		e.style.display = "block";
		f = 2;
	} else if (f == 2) {
		f = 1;
		d.style.background = '';
		d.style.display = 'block';
		c.style.display = 'none';
		e.style.display = 'none';
	}
}
// 第二
var one = document.querySelector("#one");
var one1 = document.querySelector("#one1");
var one2 = document.querySelector("#one2");
var one3 = document.querySelector("#one3");
var one4 = document.querySelector("#one4");
var f = 1;
one.onclick = function() {
	if (f == 1) {
		f = 2;
		one3.style.background = "#F5F5F5";
		one1.style.display = "none";
		one2.style.display = "block";
		one4.style.display = "block";
	} else if (f == 2) {
		f = 1;
		one3.style.background = '';
		one1.style.display = 'block';
		one2.style.display = 'none';
		one4.style.display = 'none';
	}
}
// 第三
var tow = document.querySelector("#tow");
var tow1 = document.querySelector("#tow1");
var tow2 = document.querySelector("#tow2");
var tow3 = document.querySelector("#tow3");
var tow4 = document.querySelector("#tow4");
var f = 1;
tow.onclick = function() {
	if (f == 1) {
		f = 2;
		tow3.style.background = "#F5F5F5";
		tow1.style.display = "none";
		tow2.style.display = "block";
		tow4.style.display = "block";
	} else if (f == 2) {
		f = 1;
		tow3.style.background = '';
		tow1.style.display = 'block';
		tow2.style.display = 'none';
		tow4.style.display = 'none';
	}
}
// 第四
var three = document.querySelector("#three");
var three1 = document.querySelector("#three1");
var three2 = document.querySelector("#three2");
var three3 = document.querySelector("#three3");
var three4 = document.querySelector("#three4");
var f = 1;
three.onclick = function() {
	if (f == 1) {
		f = 2;
		three3.style.background = "#F5F5F5";
		three1.style.display = "none";
		three2.style.display = "block";
		three4.style.display = "block";
	} else if (f == 2) {
		f = 1;
		three3.style.background = '';
		three1.style.display = 'block';
		three2.style.display = 'none';
		three4.style.display = 'none';
	}
}
// 第五
var four = document.querySelector("#four");
var four1 = document.querySelector("#four1");
var four2 = document.querySelector("#four2");
var four3 = document.querySelector("#four3");
var four4 = document.querySelector("#four4");
var f = 1;
four.onclick = function() {
	if (f == 1) {
		f = 2;
		four3.style.background = "#F5F5F5";
		four1.style.display = "none";
		four2.style.display = "block";
		four4.style.display = "block";
	} else if (f == 2) {
		f = 1;
		four3.style.background = '';
		four1.style.display = 'block';
		four2.style.display = 'none';
		four4.style.display = 'none';
	}
}
// 第六
var five = document.querySelector("#five");
var five1 = document.querySelector("#five1");
var five2 = document.querySelector("#five2");
var five3 = document.querySelector("#five3");
var five4 = document.querySelector("#five4");
var f = 1;
five.onclick = function() {
	if (f == 1) {
		f = 2;
		five3.style.background = "#F5F5F5";
		five1.style.display = "none";
		five2.style.display = "block";
		five4.style.display = "block";
	} else if (f == 2) {
		f = 1;
		five3.style.background = '';
		five1.style.display = 'block';
		five2.style.display = 'none';
		five4.style.display = 'none';
	}
}
// 第七
var six = document.querySelector("#six");
var six1 = document.querySelector("#six1");
var six2 = document.querySelector("#six2");
var six3 = document.querySelector("#six3");
var six4 = document.querySelector("#six4");
var f = 1;
six.onclick = function() {
	if (f == 1) {
		f = 2;
		six3.style.background = "#F5F5F5";
		six1.style.display = "none";
		six2.style.display = "block";
		six4.style.display = "block";
	} else if (f == 2) {
		f = 1;
		six3.style.background = '';
		six1.style.display = 'block';
		six2.style.display = 'none';
		six4.style.display = 'none';
	}
}
// 第八
var seven = document.querySelector("#seven");
var seven1 = document.querySelector("#seven1");
var seven2 = document.querySelector("#seven2");
var seven3 = document.querySelector("#seven3");
var seven4 = document.querySelector("#seven4");
var f = 1;
seven.onclick = function() {
	if (f == 1) {
		f = 2;
		seven3.style.background = "#F5F5F5";
		seven1.style.display = "none";
		seven2.style.display = "block";
		seven4.style.display = "block";
	} else if (f == 2) {
		f = 1;
		seven3.style.background = '';
		seven1.style.display = 'block';
		seven2.style.display = 'none';
		seven4.style.display = 'none';
	}
}
// 第九
var eight = document.querySelector("#eight");
var eight1 = document.querySelector("#eight1");
var eight2 = document.querySelector("#eight2");
var eight3 = document.querySelector("#eight3");
var eight4 = document.querySelector("#eight4");
var f = 1;
eight.onclick = function() {
	if (f == 1) {
		f = 2;
		eight3.style.background = "#F5F5F5";
		eight1.style.display = "none";
		eight2.style.display = "block";
		eight4.style.display = "block";
	} else if (f == 2) {
		f = 1;
		eight3.style.background = '';
		eight1.style.display = 'block';
		eight2.style.display = 'none';
		eight4.style.display = 'none';
	}
}

// 返回顶部
var ding = document.querySelector("#ding")

window.onscroll = function() {
	console.log(document.documentElement.scrollTop || document.body.scrollTop);

	if (document.documentElement.scrollTop > 1000 || document.body.scrollTop) {
		ding.style.display = "block";
	} else {
		ding.style.display = "none";
	}
}

ding.addEventListener('click', function() {
	window.scrollTo(0, 0);
	// window.scrollTo({
	// 	top:0,
	// 	behavior:'smooth'
	// });
})
// 地图

var c = document.querySelector(".card");
var d = document.querySelector(".di");
c.onclick = function() {
	d.style.display = "block";
}

d.onmouseover = function() {
	d.style.display = "block";
}
d.onmouseout = function() {
	d.style.display = "none";
}
